package com.block.common.exception;


import cn.hutool.core.util.StrUtil;
import lombok.Data;

@Data
public class ApiException extends  Exception{
    private  String errorCode;
    private String errorMsg;
    public ApiException(){

    }
    public ApiException(String errorCode, String errorMsg){
        this.errorCode=errorCode;
        this.errorMsg=errorMsg;
    }
    public ApiException(String errorCode, String errorMsg,Object ... msgFmt ){
        this.errorCode=errorCode;
        this.errorMsg=StrUtil.format(errorMsg,msgFmt);
    }
    public ApiException(String message) {
        super(message);
    }

    public ApiException(String message, Throwable cause) {

        super(message, cause);
    }
}
